Conversation
keepercli-package/src/keepercli/commands/password_generate.py
Dismissed
Show dismissed
Hide dismissed
keepercli-package/src/keepercli/commands/password_generate.py
Dismissed
Show dismissed
Hide dismissed
| try: | ||
| import pyperclip | ||
| CLIPBOARD_AVAILABLE = True | ||
| except ImportError: |
There was a problem hiding this comment.
Remove try except while importing
|
|
||
| def execute(self, context: KeeperParams, **kwargs) -> Any: | ||
| """Execute the password generation command.""" | ||
| try: |
There was a problem hiding this comment.
add context and vault verification to ensure user is logged in, refer other command execution method
|
|
||
| if not request.enable_breach_scan: | ||
| logger.debug("BreachWatch scanning disabled by user") | ||
| elif context.vault and context.vault.breach_watch_plugin(): |
There was a problem hiding this comment.
dont check context.vault here, that would be the first step in execute method
Don't pass context to this method, only pass vault
| breach_watch = breach_watch_plugin.breach_watch | ||
| logger.debug("Using BreachWatch for password scanning") | ||
| else: | ||
| logger.debug("BreachWatch not available (vault not initialized or feature not enabled)") |
There was a problem hiding this comment.
change this mesaage to breachwatch plugin not available, enable it to use and make it logger.warning
| @@ -0,0 +1,4 @@ | |||
| Strength(%) BreachWatch Password | |||
| 1 100 Skipped helmet prosper artefact paddle style cannon slow left original logic hawk loyal middle sugar enable carbon asset hood patient apple ability seminar fold family | |||
There was a problem hiding this comment.
What is the purpose of this file
adeshmukh-ks
left a comment
There was a problem hiding this comment.
In all examples, remove arguments from the CLI and add hardcoded variables which can be forwarded to the functions instead, this makes it easier to change for user
Implemented the 'generate' command, which generates random passwords according to user-defined parameters for password length, complexity, and composition.